package com.sctvcloud.dongqu.ui.adapter.holder;

import android.content.Context;
import android.text.TextUtils;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;

import com.ruihang.generalibrary.ui.adapter.holder.BaseRecylerHolder;
import com.ruihang.generalibrary.ui.widget.CustomEXImageView;
import com.ruihang.generalibrary.ui.widget.CustomFontTextView;
import com.sctvcloud.dongqu.R;
import com.sctvcloud.dongqu.beans.GovItemBean;
import com.sctvcloud.dongqu.ui.util.IListShowData;
import com.sctvcloud.dongqu.ui.utils.GlideCircleTransform;
import com.sctvcloud.dongqu.ui.utils.GlideUtil;

import butterknife.BindView;
import butterknife.ButterKnife;

public class GovMailHolder extends BaseAbsHolder<IListShowData> implements View.OnClickListener {

    @BindView(R.id.iv_shuji)
    protected ImageView iv_shuji;
    @BindView(R.id.iv_shizhang)
    protected ImageView iv_shizhang;

    @BindView(R.id.re_above)
    protected RelativeLayout re_above;


    private IListShowData item;

    public GovMailHolder(Context context, View itemView) {
        super(context, itemView);
        itemView.setOnClickListener(this);
        iv_shuji.setOnClickListener(this);
        iv_shizhang.setOnClickListener(this);
    }

    @Override
    protected void initInject() {
        ButterKnife.bind(this, itemView);
    }

    @Override
    public void setData(IListShowData item) {
        this.item = item;
        re_above.setVisibility(View.VISIBLE);
    }

    @Override
    public void onClick(View v) {
        if (v.getId() == R.id.iv_shuji) {
            if (internalClick != null) {
                internalClick.onItemInternalClick(iv_shuji, v, getAdapterPosition());
            }
        }
        if (v.getId() == R.id.iv_shizhang) {
            if (internalClick != null) {
                internalClick.onItemInternalClick(iv_shizhang, v, getAdapterPosition());
            }
        }


    }


}
